From: Andrew Garrett Date: Thu, 18 Jun 2009 17:41:33 +0000 (+0000) Subject: Add quoting functionality to LQT reply view X-Git-Tag: 1.31.0-rc.0~41300 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=bff2477d742d81ad135081570284af5d66bdbb51;p=lhc%2Fweb%2Fwiklou.git Add quoting functionality to LQT reply view --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 7477698161..d3732b0775 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -103,7 +103,8 @@ class EditPage { $this->editFormTextBeforeContent = $this->editFormTextAfterWarn = $this->editFormTextAfterTools = - $this->editFormTextBottom = ""; + $this->editFormTextBottom = + $this->mPreloadText = ""; } function getArticle() { @@ -200,6 +201,11 @@ class EditPage { wfProfileOut( __METHOD__ ); return $text; } + + /** Use this method before edit() to preload some text into the edit box */ + public function setPreloadedText( $text ) { + $this->mPreloadText = $text; + } /** * Get the contents of a page from its title and remove includeonly tags @@ -208,7 +214,9 @@ class EditPage { * @return string The contents of the page. */ protected function getPreloadedText( $preload ) { - if ( $preload === '' ) { + if ( !empty($this->mPreloadText) ) { + return $this->mPreloadText; + } elseif ( $preload === '' ) { return ''; } else { $preloadTitle = Title::newFromText( $preload );